package com.jt.controller;

import com.jt.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

@Controller
public class TestController {


    @RequestMapping("/test")
    public String doTest(HttpServletRequest request){

        List<User> list = new ArrayList<User>();
        list.add(new User(1,"tom",18,"男"));
        list.add(new User(2,"lucy",19,"女"));
        list.add(new User(3,"jerry",29,"男"));
        request.setAttribute("stuList", list);
        System.out.println(list);
        return "test";
    }
}


